@echo off
set db2_server_name=%1
if {%1}=={} goto noparms 
if {%1}=={dev} goto dev
if {%1}=={test} goto test
if {%1}=={prod} goto prod
if {%1}=={off} goto terminate
goto dev

:noparms 
echo Usage: conn db2type 
echo example: conn dev 
echo db2type -- dev, test, prod, off
goto end 

:dev
db2 connect to db2dev user username using password
PROMPT $P(%1)$G
goto end

:test
db2 connect to db2test user username using password
PROMPT $P(%1)$G
goto end

:prod
db2 connect to db2prod user username using password
PROMPT $P(%1)$G
goto end

:terminate
db2 terminate
PROMPT $P$G
goto end 

:end